package org.zjh.utils;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

/**
 * @description: 读取数据库配置文件
 * @author 郑佳豪
 * @date 2024/10/8 16:59
 * @version 1.0
 */
public class DBPropUtil {
    //驱动
    public static String driver;
    //地址
    public static String url;
    //用户名
    public static String user;
    //密码
    public static String password;

    private DBPropUtil(){}


    static {
        Properties prop = new Properties();
        try {
            prop.load(new FileInputStream("conf/db.properties"));
            driver = prop.getProperty("dirver");
            url = prop.getProperty("url");
            user = prop.getProperty("user");
            password = prop.getProperty("password");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
